package com.ldcc.report_system.component;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.ldcc.report_system.R;

/**
 * @author wwj[yeshengkele@outlool.com]
 * @description 自定义添加日报输入框
 */
public class ReportEditLayout extends LinearLayout {


    private TextView editInfoText;
    private EditText editValue;

    public ReportEditLayout(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        LayoutInflater.from(context).inflate(R.layout.component_report_edit, this);
        this.editInfoText = findViewById(R.id.edit_info_text);
        this.editValue = findViewById(R.id.edit_value);
        TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.report_edit_text);
        this.editInfoText.setText(typedArray.getString(R.styleable.report_edit_text_editInfoText));
        typedArray.recycle();
    }

    public TextView getEditInfoText() {
        return editInfoText;
    }

    public void setEditInfoText(TextView editInfoText) {
        this.editInfoText = editInfoText;
    }

    public EditText getEditValue() {
        return editValue;
    }

    public void setEditValue(EditText editValue) {
        this.editValue = editValue;
    }
}
